<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 400px;
            height: 100px;
            background: url(img/2021-9-28_21-50-56.png);
            border: 2px solid red;
            /* background-size: 50% 50%; */
            background-size: contain;
        }
        div:first-child{
            background-size:contain;
        }        
        div:last-child{
/* 全部覆盖 */
            background-size:cover;

        }
    </style>
</head>
<body>
    <div></div><br>
    <div></div>

</body>
</html>